<div class="miya_nav">
    <ul class="miya_nav_box">
        <li><a class="js_active" href="{{ route('index') }}">网站首页</a></li>
        <li>
            <a class="js_active" href="{{ route('page_default','about') }}">关于我们</a>
            <ul class="miya_nav_scroll">
                @foreach($pages['about'] as $value)
                    <li><a href="{{ route('page',['about',$value['id']]) }}">{{ $value['name'] }}</a></li>
                @endforeach
            </ul>
        </li>
        <li>
            <a class="js_active" href="{{ route('sort_all','product') }}">产品中心</a>
            <ul class="miya_nav_scroll">
                @foreach($sorts['product'] as $value)
                    <li><a href="{{ route('sort',['product',$value['id']]) }}">{{ $value['name'] }}</a></li>
                @endforeach
            </ul>
        </li>
        <li>
            <a class="js_active" href="{{ route('sort_all','new') }}">新闻中心</a>
            <ul class="miya_nav_scroll">
                @foreach($sorts['new'] as $value)
                    <li><a href="{{ route('sort',['new',$value['id']]) }}">{{ $value['name'] }}</a></li>
                @endforeach
            </ul>
        </li>
        <li>
            <a class="js_active" href="{{ route('sort_all','case') }}">案例中心</a>
            <ul class="miya_nav_scroll">
                @foreach($sorts['case'] as $value)
                    <li><a href="{{ route('sort',['case',$value['id']]) }}">{{ $value['name'] }}</a></li>
                @endforeach
            </ul>
        </li>
        <li><a class="js_active" href="{{ route('message') }}">在线留言</a></li>
        <li><a class="js_active" href="{{ route('page',['about',9]) }}">联系我们</a></li>
    </ul>
</div>

<script>
    //选中当前所在位置的按钮
    $('.js_active[href="{{ route('index') }}"]').addClass('active');
</script>